home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / plugin / nsICookieStorage.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  4KB  |  124 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsICookieStorage.idl
  3.  */
  4.  
  5. #ifndef __gen_nsICookieStorage_h__
  6. #define __gen_nsICookieStorage_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. #ifndef __gen_nspluginroot_h__
  14. #include "nspluginroot.h"
  15. #endif
  16.  
  17. /* For IDL files that don't want to include root IDL files. */
  18. #ifndef NS_NO_VTABLE
  19. #define NS_NO_VTABLE
  20. #endif
  21. // {c8c05101-cfdb-11d2-bab8-b088e084e5bc}
  22. #define NS_COOKIESTORAGE_CID \
  23. { 0xc8c05101, 0xcfdb, 0x11d2, { 0xba, 0xb8, 0xb0, 0x88, 0xe0, 0x84, 0xe5, 0xbc } }
  24.  
  25. /* starting interface:    nsICookieStorage */
  26. #define NS_ICOOKIESTORAGE_IID_STR "c8c05100-cfdb-11d2-bab8-b088e084e5bc"
  27.  
  28. #define NS_ICOOKIESTORAGE_IID \
  29.   {0xc8c05100, 0xcfdb, 0x11d2, \
  30.     { 0xba, 0xb8, 0xb0, 0x88, 0xe0, 0x84, 0xe5, 0xbc }}
  31.  
  32. /**
  33.  * nsICookieStorage
  34.  */
  35. class NS_NO_VTABLE nsICookieStorage : public nsISupports {
  36.  public: 
  37.  
  38.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICOOKIESTORAGE_IID)
  39.  
  40.   /**
  41.      * Retrieves a cookie from the browser's persistent cookie store.
  42.      * @param aCookieURL    - URL string to look up cookie with.
  43.      * @param aCookieBuffer - buffer large enough to accomodate cookie data.
  44.      * @param aCookieSize   - on input, size of the cookie buffer, on output cookie's size.
  45.      */
  46.   /* void getCookie (in string aCookieURL, in voidPtr aCookieBuffer, in PRUint32Ref aCookieSize); */
  47.   NS_IMETHOD GetCookie(const char *aCookieURL, void * aCookieBuffer, PRUint32 & aCookieSize) = 0;
  48.  
  49.   /**
  50.      * Stores a cookie in the browser's persistent cookie store.
  51.    * @param aCookieURL    - URL string store cookie with.
  52.    * @param aCookieBuffer - buffer containing cookie data.
  53.    * @param aCookieSize   - specifies  size of cookie data.
  54.      */
  55.   /* void setCookie (in string aCookieURL, in constVoidPtr aCookieBuffer, in unsigned long aCookieSize); */
  56.   NS_IMETHOD SetCookie(const char *aCookieURL, const void * aCookieBuffer, PRUint32 aCookieSize) = 0;
  57.  
  58. };
  59.  
  60. /* Use this macro when declaring classes that implement this interface. */
  61. #define NS_DECL_NSICOOKIESTORAGE \
  62.   NS_IMETHOD GetCookie(const char *aCookieURL, void * aCookieBuffer, PRUint32 & aCookieSize); \
  63.   NS_IMETHOD SetCookie(const char *aCookieURL, const void * aCookieBuffer, PRUint32 aCookieSize); 
  64.  
  65. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  66. #define NS_FORWARD_NSICOOKIESTORAGE(_to) \
  67.   NS_IMETHOD GetCookie(const char *aCookieURL, void * aCookieBuffer, PRUint32 & aCookieSize) { return _to GetCookie(aCookieURL, aCookieBuffer, aCookieSize); } \
  68.   NS_IMETHOD SetCookie(const char *aCookieURL, const void * aCookieBuffer, PRUint32 aCookieSize) { return _to SetCookie(aCookieURL, aCookieBuffer, aCookieSize); } 
  69.  
  70. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  71. #define NS_FORWARD_SAFE_NSICOOKIESTORAGE(_to) \
  72.   NS_IMETHOD GetCookie(const char *aCookieURL, void * aCookieBuffer, PRUint32 & aCookieSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCookie(aCookieURL, aCookieBuffer, aCookieSize); } \
  73.   NS_IMETHOD SetCookie(const char *aCookieURL, const void * aCookieBuffer, PRUint32 aCookieSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCookie(aCookieURL, aCookieBuffer, aCookieSize); } 
  74.  
  75. #if 0
  76. /* Use the code below as a template for the implementation class for this interface. */
  77.  
  78. /* Header file */
  79. class nsCookieStorage : public nsICookieStorage
  80. {
  81. public:
  82.   NS_DECL_ISUPPORTS
  83.   NS_DECL_NSICOOKIESTORAGE
  84.  
  85.   nsCookieStorage();
  86.  
  87. private:
  88.   ~nsCookieStorage();
  89.  
  90. protected:
  91.   /* additional members */
  92. };
  93.  
  94. /* Implementation file */
  95. NS_IMPL_ISUPPORTS1(nsCookieStorage, nsICookieStorage)
  96.  
  97. nsCookieStorage::nsCookieStorage()
  98. {
  99.   /* member initializers and constructor code */
  100. }
  101.  
  102. nsCookieStorage::~nsCookieStorage()
  103. {
  104.   /* destructor code */
  105. }
  106.  
  107. /* void getCookie (in string aCookieURL, in voidPtr aCookieBuffer, in PRUint32Ref aCookieSize); */
  108. NS_IMETHODIMP nsCookieStorage::GetCookie(const char *aCookieURL, void * aCookieBuffer, PRUint32 & aCookieSize)
  109. {
  110.     return NS_ERROR_NOT_IMPLEMENTED;
  111. }
  112.  
  113. /* void setCookie (in string aCookieURL, in constVoidPtr aCookieBuffer, in unsigned long aCookieSize); */
  114. NS_IMETHODIMP nsCookieStorage::SetCookie(const char *aCookieURL, const void * aCookieBuffer, PRUint32 aCookieSize)
  115. {
  116.     return NS_ERROR_NOT_IMPLEMENTED;
  117. }
  118.  
  119. /* End of implementation class template. */
  120. #endif
  121.  
  122.  
  123. #endif /* __gen_nsICookieStorage_h__ */
  124.